//package com.ruitu.mall_98.adapter;
//
//import android.content.Context;
//import android.widget.ImageView;
//import android.widget.RelativeLayout;
//import android.widget.TextView;
//
//import com.beanu.arad.base.my_base.Config;
//import com.beanu.arad.base.my_base.base_list.ListBaseAdapter;
//import com.beanu.arad.base.my_base.base_list.SuperViewHolder;
//import com.beanu.arad.utils.ScreenUtils;
//import com.beanu.arad.utils.SizeUtils;
//import com.ruitu.mall_98.R;
//import com.ruitu.router_module.bean.product.ProHome;
//import com.ruitu.router_module.utils.GlideUtil;
//
///**
// * Created by Administrator on 2018/3/27.
// * 首页底部商品列表adapter
// */
//public class DataAdapter extends ListBaseAdapter<ProHome> {
//    public DataAdapter(Context context) {
//        super(context);
//    }
//
//    @Override
//    public int getLayoutId() {
//        return R.layout.app_item_home_model_pro;
//    }
//
//    @Override
//    public void onBindItemHolder(SuperViewHolder holder, int position) {
//        TextView tv_name = holder.getView(R.id.tv_name);
//        TextView tv_price = holder.getView(R.id.tv_price);
//        TextView tv_old_price = holder.getView(R.id.tv_old_price);
//        TextView tv_num = holder.getView(R.id.tv_num);
//        ImageView icon = holder.getView(R.id.icon);
//
//        int width = ScreenUtils.getScreenWidth();
//        int itemWidth = (width - (SizeUtils.dp2px(20))) / 2;
//        RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) icon.getLayoutParams();
//        params.width = itemWidth;
//        params.height = itemWidth;
//        icon.setLayoutParams(params);
//
//        ProHome pro = mDataList.get(position);
//        tv_name.setText(pro.getGoodsName());
//        tv_price.setText("￥" + pro.getPrice());
//        tv_old_price.setText("￥" + pro.getOriginalPrice());
//        tv_num.setText(pro.getCount() + "评论");
//        GlideUtil.loadImg(Config.BASE_URL + pro.getImageUrl(), icon);
//    }
//}
//
